.\" $Id: PAPI_num_hwctrs.3,v 1.6 2004/10/04 02:16:28 jthomas Exp $
.TH PAPI_num_hwctrs 3 "September, 2004" "PAPI Programmer's Reference" "PAPI"

.SH NAME
PAPI_num_hwctrs \- return the number of hardware counters 

.SH SYNOPSIS
.B C Interface
.nf
.B #include <papi.h>
.BI "int PAPI_num_hwctrs();"
.fi
.B Fortran Interface
.nf
.B #include "fpapi.h"
.BI PAPIF_num_hwctrs(C_INT\  num)
.fi

.SH DESCRIPTION
.B "PAPI_num_hwctrs()" 
returns the number of physical hardware
counters present in the processor. This count does not include any
special purpose registers or performance hardware. 
.BR "PAPI_library_init" "(3) must be called"
in order for this function to return anything greater than 0.

.SH ARGUMENTS
This function takes no arguments.

.SH RETURN VALUES
On success, this function returns a value greater than zero.
.LP
A zero result usually means the library has not been initialized.

.SH EXAMPLES
.LP
.nf
.if t .ft CW
/* Query the substrate for our resources. */
printf("%d hardware counters found.\n", PAPI_num_hwctrs());
.if t .ft P
.fi

.SH BUGS
None.

.SH SEE ALSO
.BR PAPI_init_library "(3),"
.BR PAPI "(3)," PAPI_F "(3)"
